package com.sh.优先级设置;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class Test {
    public static void main(String[] args) {

        MyRunnable myRunnable = new MyRunnable();

        Thread thread1 = new Thread(myRunnable, "飞机");
        Thread thread2 = new Thread(myRunnable, "坦克");
        thread1.setPriority(1);
        thread2.setPriority(10);
        thread1.start();
        thread2.start();
//        System.out.println(thread1.getPriority());
//        System.out.println(thread2.getPriority());
    }
}

